FROM alpine:latest

RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
RUN apk --no-cache add ca-certificates tzdata libc6-compat && cp -r -f /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

COPY accumulate  /usr/bin/accumulate
COPY data.db     /usr/bin/data.db
COPY config.toml /usr/bin/config.toml
COPY web         /usr/bin/web

RUN chmod 777 /usr/bin/accumulate
WORKDIR $PRO_PATH/usr/bin/
ENTRYPOINT ["accumulate","server"]